home *** CD-ROM | disk | FTP | other *** search
- DECLARE SUB EditField (HdrLine$, NumFields%, InfoRow%, HeaderRow%, ValidChar$, ValidMsgRow%)
- DECLARE SUB Pause ()
- DECLARE SUB ErrorSound ()
-
- COMMON SHARED False, True
-
- NumFields% = 9 'assign number of fields
- MaxFieldLen% = 60 'assign the size of largest input field
-
-
- DIM SHARED StringHolder$(NumFields%, MaxFieldLen% + 1)
-
- DIM SHARED FieldName$(9) 'descriptor for field - Name:, Address:,etc
- DIM SHARED FieldNameRow%(9) 'starting row # for title field
- DIM SHARED FieldNameCol%(9) 'starting col # for title field
- DIM SHARED FieldLength%(9) 'max allowable num chars input
- DIM SHARED ValidMsg$(9) 'message to display for each field
- DIM SHARED InputRow%(9) 'starting row # for input field
- DIM SHARED InputCol%(9) 'starting col # for input field
- DIM SHARED InputString$(9) 'user input placed into this array
-
- False = 0
- True = NOT False
-
-
-
- HdrLine$ = "CUSTOMER DATA"
- NumFields% = 9
- MaxFieldLen% = 20 'size of the largest input field
- ValidMsgRow% = 20 'validation message row #
- InfoRow% = 22 'Info message display row
- HeaderRow% = 3 'row # for header...hdr col is calculated for auto-centering
-
- ValidChar$ = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789. -&"
-
- '----------- Define the field layout data for editor screen ---------------
-
- 'field # 1
- FieldName$(1) = "Name : "
- FieldLength%(1) = 20
- ValidMsg$(1) = " Please Enter Customer Name, 20 Characters Max, HARRY T. JONES"
- FieldNameRow%(1) = 5
- FieldNameCol%(1) = 3
- InputRow%(1) = 5
- InputCol%(1) = FieldNameCol%(1) + LEN(FieldName$(1))
- InputString$(1) = "" 'can assign a default val here - user may accept/change
-
- 'field # 2
- FieldName$(2) = "Address : "
- FieldLength%(2) = 20
- ValidMsg$(2) = " Please Enter Address, 20 Characters Max, 1234 W. MAIN ST."
- FieldNameRow%(2) = 5
- FieldNameCol%(2) = 42
- InputRow%(2) = 5
- InputCol%(2) = FieldNameCol%(2) + LEN(FieldName$(2))
- InputString$(2) = "" 'can place a default value here
-
- 'field # 3
- FieldName$(3) = "City : "
- FieldLength%(3) = 9
- ValidMsg$(3) = " Please Enter City Name, 12 Characters Max, 'PHOENIX'"
- FieldNameRow%(3) = 8
- FieldNameCol%(3) = 3
- InputRow%(3) = 8
- InputCol%(3) = FieldNameCol%(3) + LEN(FieldName$(3))
- InputString$(3) = "" 'can place a default value here
-
- 'field # 4
- FieldName$(4) = "State : "
- FieldLength%(4) = 2
- ValidMsg$(4) = " Please Enter State Code, 2 Characters Max, 'AZ'"
- FieldNameRow%(4) = 8
- FieldNameCol%(4) = 42
- InputRow%(4) = 8
- InputCol%(4) = FieldNameCol%(4) + LEN(FieldName$(4))
- InputString$(4) = "" 'can place a default value here
-
- 'field # 5
- FieldName$(5) = "Zip : "
- FieldLength%(5) = 5
- ValidMsg$(5) = " Please Enter ZIP Code, 5 Digits, '85345'"
- FieldNameRow%(5) = 8
- FieldNameCol%(5) = 65
- InputRow%(5) = 8
- InputCol%(5) = FieldNameCol%(5) + LEN(FieldName$(5))
- InputString$(5) = "" 'can place a default value here
-
- 'field # 6
- FieldName$(6) = "Phone : "
- FieldLength%(6) = 12
- ValidMsg$(6) = " Please Enter Area Code and Phone Number, 12 Digits, '602 555-1212'"
- FieldNameRow%(6) = 11
- FieldNameCol%(6) = 3
- InputRow%(6) = 11
- InputCol%(6) = FieldNameCol%(6) + LEN(FieldName$(6))
- InputString$(6) = "" 'can place a default value here
-
- 'field # 7
- FieldName$(7) = "Account Number : "
- FieldLength%(7) = 10
- ValidMsg$(7) = " Please Enter Account Number, 10 Digits, '25A1714TR3'"
- FieldNameRow%(7) = 14
- FieldNameCol%(7) = 3
- InputRow%(7) = 14
- InputCol%(7) = FieldNameCol%(7) + LEN(FieldName$(7))
- InputString$(7) = "" 'can place a default value here
-
- 'field # 8
- FieldName$(8) = "Account Balance : "
- FieldLength%(8) = 8
- ValidMsg$(8) = " Please Enter Account Balance, 50000.00 Max, Do NOT Include '$' Sign"
- FieldNameRow%(8) = 14
- FieldNameCol%(8) = 42
- InputRow%(8) = 14
- InputCol%(8) = FieldNameCol%(8) + LEN(FieldName$(8))
- InputString$(8) = "" 'can place a default value here
-
- 'field # 9
- FieldName$(9) = "Comments : "
- FieldLength%(9) = 60
- ValidMsg$(9) = " Please Enter Comments 60 Characters Max"
- FieldNameRow%(9) = 17
- FieldNameCol%(9) = 3
- InputRow%(9) = 17
- InputCol%(9) = FieldNameCol%(9) + LEN(FieldName$(9))
- InputString$(9) = "" 'can place a default value here
-
- '----------------define editor control data-------------------------
-
- DO
-
- CALL EditField(HdrLine$, NumFields%, InfoRow%, HeaderRow%, ValidChar$, ValidMsgRow%)
-
- 'reassign for convenience-if there are many numeric fields to test, a
- 'line longer than 255 characters may result if we don't use short scalars
- a$ = InputString$(1) 'name
- B$ = InputString$(2) 'address
- C$ = InputString$(3) 'city
- D$ = InputString$(4) 'state
- E$ = InputString$(5) 'zip
- F$ = InputString$(6) 'phone
- G$ = InputString$(7) 'acct #
- H$ = InputString$(8) 'acct bal
- I$ = InputString$(9) 'comments
-
- 'if you are calling the editor multiple times from within a loop, you
- 'may wish to null-out InputString$ (unless you wish the values from
- 'the previous screen to be defaults for the next screen)
-
- InputString$(1) = ""
- InputString$(2) = ""
- InputString$(3) = ""
- InputString$(4) = ""
- InputString$(5) = ""
- InputString$(6) = ""
- InputString$(7) = ""
- InputString$(8) = ""
- InputString$(9) = ""
-
- ' -- All character fields are validated within EditField --
- ' Validate numeric values here
-
- 'did any numeric field exceed limits ? (this example screen has only 1)
- IF VAL(H$) > 50000! THEN
- ValsInLimit = False
- CALL ErrorSound
- CLS
- LOCATE 12, 15
- PRINT "All Fields Are Not Within Max Limits - Please Check"
- CALL Pause
- ELSE
- ValsInLimit = True
- END IF
-
- LOOP UNTIL ValsInLimit
-
- 'convert any fields which contain values rather than strings here
- H1 = VAL(H$)
-
- 'this section will print the results to screen-this is where you would
- 'normally assign the user-input values to your own pgm variables
-
- CLS
- PRINT a$
- PRINT B$
- PRINT C$
- PRINT D$
- PRINT E$
- PRINT F$
- PRINT G$
- PRINT H1
- PRINT I$
-
-
- END
-
- SUB EditField (HdrLine$, NumFields%, InfoRow%, HeaderRow%, ValidChar$, ValidMsgRow%)
- '
- '----------------------------------------------------------------------------
- ' Input : Number of fields to be displayed in NumFields%, starting row
- ' numbers in InputRow%(), starting col #'s in InputCol%(), field
- ' names to display in FieldName$(), field lengths (for
- ' highlighting) in FieldLength%(), row & col on which to display
- ' field name in FieldNameRow%() & FieldNameCol%(), header title
- ' string to display in HdrLine$, row on which to display the
- ' header line (if any) HeaderRow%, list of valid characters which
- ' may be entered in ValidCar$, description displayed at bottom of
- ' display telling user what type of input is expected in
- ' ValidMsg$(), row on which to display ValidMsg$ in ValidMsgRow%,
- ' row # on which to display info on InfoRow%, valid characters to
- ' accept in ValidChar$.
- ' Process : Sets up a screen editor which allows user to enter all
- ' pertinent data one field at a time. When user is satisfied,
- ' F1 is typed.
- ' Output : Data entered into fields by user in 1-d array InputString$()
- ' Coupling : Called by Main
- ' Calls ErrorSound
- '
- '----------------------------------------------------------------------------
-
- 'this array sets up a matrix of individual rows and column cells
- 'the editor loads one column location at a time-the array contents
- 'are re-assigned to a scalar, variable-length string array after user
- 'accepts the screen data-must have one extra col for insert mode
- '
- 'assign the key values to appropriate descriptors
- DNARROW$ = CHR$(0) + CHR$(80)
- UPARROW$ = CHR$(0) + CHR$(72)
- LFARROW$ = CHR$(0) + CHR$(75)
- RTARROW$ = CHR$(0) + CHR$(77)
- F1$ = CHR$(0) + CHR$(59)
- ENTER$ = CHR$(13)
- FWDTAB$ = CHR$(9)
- BKWDTAB$ = CHR$(0) + CHR$(15)
- DEL$ = CHR$(0) + CHR$(83)
- INS$ = CHR$(0) + CHR$(82)
- DELARROW$ = CHR$(8)
-
- 'title line normal colors
- FrgdNorm% = 3
- BkgdNorm% = 0
- 'header line colors
- HdrFrgdNorm% = 14
- HdrBkgdNorm% = 0
- 'title highlight colors
- FrgdHi% = 4
- BkgdHi% = 7
- 'Info line color
- InfoFrgd% = 3
- InfoBkgd% = 0
- 'field data norm color
- FieldFrgdNorm% = 2
- FieldBkgdNorm% = 0
- 'field data highlite color
- FieldFrgdHi% = 4
- FieldBkgdHi% = 7
- 'insert off indicator colors
- InsOffFrgd% = 3
- InsOffBkgd% = 0
- 'insert on indicator colors
- InsOnFrgd% = 4
- InsOnBkgd% = 7
-
- 'assign any default values passed in to the string matrix
- FOR FieldIndex% = 1 TO NumFields%
-
- FOR ColIndex% = 1 TO MaxFieldLen%
- StringHolder$(FieldIndex%, ColIndex%) = MID$(InputString$(FieldIndex%), ColIndex%, 1)
- NEXT ColIndex%
-
- 'null out each row, we will re-assign before leaving routine
- InputString$(FieldIndex%) = ""
-
- NEXT FieldIndex%
-
- 'Top of "Do Edit Routine Until User Is Sure He/She Wishes To Quit" Loop
- DO
-
- CLS
-
- 'set default selection # to 1
- FieldCtr% = 1
- 'display whole screen in normal colors
- COLOR FrgdNorm%, BkgdNorm%, 0
- 'center the header line
- HdrLineCol% = (80 - LEN(HdrLine$)) \ 2
- COLOR HdrFrgdNorm%, HdrBkgdNorm%
- LOCATE HeaderRow%, HdrLineCol%
- PRINT HdrLine$
-
- COLOR FieldFrgdHi%, FieldBkgdHi%, 0
- LOCATE ValidMsgRow%, 2
- PRINT STRING$(77, " ")
- LOCATE ValidMsgRow%, 2
- PRINT ValidMsg$(FieldCtr%)
-
- LOCATE InfoRow%, 2
- COLOR InfoFrgd%, InfoBkgd%, 0
- PRINT "Use Arrows,TAB Or ENTER To Move Highlight Bar, ";
- COLOR HdrFrgdNorm%, HdrBkgdNorm%
- PRINT "<F1>";
- COLOR InfoFrgd%, InfoBkgd%, 0
- PRINT " When Done Editing Screen"
-
- InsertOn = False
- 'set cursor to small line-indicates insert off
- CursorStart = 6
- CursorStop = 7
- InsStatus$ = " INSERT OFF "
- LOCATE 2, 65
- COLOR InsOffFrgd%, InsOffBkgd%, 0
- PRINT InsStatus$
-
- COLOR FrgdNorm%, BkgdNorm%, 0
-
- 'display the choices
- FOR Ctr% = 1 TO NumFields%
- 'display all the field names and defaults (if any)
- COLOR FrgdNorm%, BkgdNorm%, 0
- LOCATE FieldNameRow%(Ctr%), FieldNameCol%(Ctr%)
- PRINT FieldName$(Ctr%);
- COLOR FieldFrgdNorm%, FieldBkgdNorm%, 0
- 'input string may either be empty or contain defaults
- LOCATE InputRow%(Ctr%), InputCol%(Ctr%)
-
- FOR I% = 1 TO FieldLength%(Ctr%)
- PRINT StringHolder$(Ctr%, I%);
- LOCATE InputRow%(Ctr%), InputCol%(Ctr%) + I%
- NEXT I%
-
- LOCATE InputRow%(Ctr%), InputCol%(Ctr%)
-
- NEXT Ctr%
-
- Index% = 1
- CharCtr% = 1
- FieldCtr% = 1
- Row% = InputRow%(FieldCtr%)
- Col% = InputCol%(FieldCtr%)
-
- 'we will highlight 1st selection when menu comes up, row 1 col 1
- HiLiteRow% = InputRow%(FieldCtr%)
- HiLiteCol% = InputCol%(FieldCtr%)
-
- GOSUB HIGHLIGHT
-
- LOCATE InputRow%(FieldCtr%), InputCol%(FieldCtr%), 0
-
- 'Top of "Do <Edit Any Field> Until User Hits Enter Key" loop
- DO
- 'Top of "Do <Get Key> Until User Hits a Key" loop
- DO
- 'may be 1 or 2 bytes long
- Ky$ = INKEY$
- 'put cursor where it belongs while waiting for input
- LOCATE Row%, Col%, 1, CursorStart, CursorStop
-
- LOOP UNTIL LEN(Ky$) > 0
-
- LOCATE , , 1, CursorStart, CursorStop
- 'include this statement to change all to uppercase
- 'Ky$ = UCASE$(Ky$)
-
- SELECT CASE Ky$
-
- '*************** INSERT KEY TOGGLED ****************
-
- CASE IS = INS$
-
- 'toggle the insert status var
- IF InsertOn THEN
- InsertOn = False
- CursorStart = 7
- CursorStop = 7
- InsStatus$ = " INSERT OFF "
- LOCATE 2, 65
- COLOR InsOffFrgd%, InsOffBkgd%, 0
- PRINT InsStatus$
- COLOR 4, 7, 0
- LOCATE InputRow%(FieldCtr%), InputCol%(FieldCtr%), 1, CursorStart, CursorStop
-
- 'toggle the insert status var to on
- ELSEIF NOT InsertOn THEN
- InsertOn = True
- 'change to block cursor
- CursorStart = 0
- CursorStop = 7
- InsStatus$ = " INSERT ON "
- LOCATE 2, 65
- COLOR InsOnFrgd%, InsOnBkgd%, 0
- PRINT InsStatus$
- LOCATE InputRow%(FieldCtr%), InputCol%(FieldCtr%), 1, CursorStart, CursorStop
- END IF
-
- '****************** FORWARD TAB OR <CR> PRESSED *********************
-
- CASE IS = FWDTAB$, ENTER$, DNARROW$
- 'un-highlight the old field
- NormRow% = InputRow%(FieldCtr%)
- NormCol% = InputCol%(FieldCtr%)
-
- GOSUB NORMAL
-
- 'did we advance or rollback to top ?
- IF FieldCtr% = NumFields% THEN
- 'when a col rollup occurs, the value of FieldCtr% goes back to 1
- FieldCtr% = 1
- ELSE
- FieldCtr% = FieldCtr% + 1
- END IF
-
- Row% = InputRow%(FieldCtr%)
-
- 'highlight the next field
- HiLiteRow% = InputRow%(FieldCtr%)
- HiLiteCol% = InputCol%(FieldCtr%)
- Col% = InputCol%(FieldCtr%)
- Index% = 1
- CharCtr% = 1
-
- GOSUB HIGHLIGHT
-
- LOCATE InputRow%(FieldCtr%), InputCol%(FieldCtr%), 1, CursorStart, CursorStop
- 'user is changing fields so init vars
- COLOR FieldFrgdHi%, FieldBkgdHi%, 0
- LOCATE ValidMsgRow%, 2
- PRINT STRING$(77, " ")
- LOCATE ValidMsgRow%, 2
- PRINT ValidMsg$(FieldCtr%)
-
- '*************** UP ARROW OR SHIFT-TAB PRESSED ********************
-
- CASE IS = BKWDTAB$, UPARROW$
-
- 'un-highlight the old field
- NormRow% = InputRow%(FieldCtr%)
- NormCol% = InputCol%(FieldCtr%)
- GOSUB NORMAL
-
- 'are we about to wrapdown to bot of list ?
- IF FieldCtr% = 1 THEN
- 'when wrapping to last field occurs, the value of FieldCtr%
- 'becomes the largest field number
- FieldCtr% = NumFields%
- ELSE
- FieldCtr% = FieldCtr% - 1
- END IF
-
- 'we were at first field, so we are now going to wrap to last field
- Row% = InputRow%(FieldCtr%)
-
- HiLiteRow% = Row%
- HiLiteCol% = InputCol%(FieldCtr%)
- Col% = InputCol%(FieldCtr%)
- Index% = 1
- CharCtr% = 1
-
- GOSUB HIGHLIGHT
-
- COLOR FieldFrgdHi%, FieldBkgdHi%, 0
- LOCATE ValidMsgRow%, 2
- PRINT STRING$(77, " ")
- LOCATE ValidMsgRow%, 2
- PRINT ValidMsg$(FieldCtr%)
-
- '**************** LEFT ARROW PRESSED ******************
-
- CASE IS = LFARROW$
-
- 'can we move to the left in this field?
- IF Index% > 1 THEN
- 'dec col ctr
- Col% = Col% - 1
- 'dec array ptr
- Index% = Index% - 1
- 'dec char counter
- CharCtr% = CharCtr% - 1
- 'reposition cursor
- LOCATE Row%, Col%
- ELSE
- SOUND 4200, 1
- END IF
-
- '**************** RIGHT ARROW PRESSED ******************
-
- CASE IS = RTARROW$
-
- 'can we still move to the right in this field?
- IF Index% < (FieldLength%(FieldCtr%)) THEN
- 'inc col ctr
- Col% = Col% + 1
- 'inc array ptr
- Index% = Index% + 1
- CharCtr% = CharCtr% + 1
- 'reposition cursor
- LOCATE Row%, Col%
- ELSE
- SOUND 4200, 1
- END IF
-
- '**************** DELETE KEY PRESSED ******************
-
- CASE IS = DEL$
-
- IF Index% > 0 THEN
-
- 'we deleted char in position 'Index%, so pull all char's
- 'which are to the right of that char one to the left
- FOR ColIndx% = Index% TO (FieldLength%(FieldCtr%) - 1)
- StringHolder$(FieldCtr%, ColIndx%) = StringHolder$(FieldCtr%, (ColIndx% + 1))
- NEXT ColIndx%
- StringHolder$(FieldCtr%, FieldLength%(FieldCtr%)) = " "
- 'blank out the whole field, then re-print new value
- LOCATE Row%, InputCol%(FieldCtr%), 0
- 'print out the whole reconstructed array for this field
- FOR I% = 1 TO (FieldLength%(FieldCtr%))
- PRINT StringHolder$(FieldCtr%, I%);
- NEXT I%
- END IF
-
- '**************** DELETE ARROW PRESSED ******************
-
- CASE IS = DELARROW$
-
- IF Index% > 1 THEN
- 'we deleted char in position 'Index%, so pull all char's
- 'which are to the right of that char one to the left
- FOR ColIndx% = Index% TO (FieldLength%(FieldCtr%) + 1)
- StringHolder$(FieldCtr%, ColIndx% - 1) = StringHolder$(FieldCtr%, (ColIndx%))
- NEXT ColIndx%
- StringHolder$(FieldCtr%, FieldLength%(FieldCtr%)) = " "
- 'back-up the cursor position
- Col% = Col% - 1
- 'back-up the array ptr
- Index% = Index% - 1
- 'subtract one character
- CharCtr% = CharCtr% - 1
- LOCATE Row%, InputCol%(FieldCtr%), 0
- FOR I% = 1 TO (FieldLength%(FieldCtr%))
- PRINT StringHolder$(FieldCtr%, I%);
- NEXT I%
- ELSE
- SOUND 4200, 1
- END IF
-
- LOCATE Row%, Col%
-
- '******* SOMETHING ELSE BESIDES A DIRECTION KEY PRESSED ************
-
- CASE ELSE
-
- 'if user didn't hit enter key, see if it is a valid char
- IF Ky$ <> F1$ THEN
- 'is this a valid character ?
- IF INSTR(ValidChar$, Ky$) THEN
- 'do we still have room in this field ?
- IF Index% <= (FieldLength%(FieldCtr%)) THEN
- 'is insert on or off ?
- IF NOT InsertOn THEN
- 'insert is off, type over what is currently there
- StringHolder$(FieldCtr%, Index%) = Ky$
- LOCATE InputRow%(FieldCtr%), InputCol%(FieldCtr%) + (Index% - 1), 0
- Row% = InputRow%(FieldCtr%)
- Col% = InputCol%(FieldCtr%) + (Index% - 1)
- PRINT StringHolder$(FieldCtr%, Index%)
-
- 'insert is on, we must shove everything to the right
- ELSE
- 'we inserted a char in position Index%, so push all char's
- 'which are to the right of that char one more to the right
- '(must work backwards thru the string array to avoid overwriting)
- FOR ColIndx% = (FieldLength%(FieldCtr%) - 1) TO Index% STEP -1
- StringHolder$(FieldCtr%, ColIndx% + 1) = StringHolder$(FieldCtr%, (ColIndx%))
- NEXT ColIndx%
-
- StringHolder$(FieldCtr%, Index%) = Ky$
-
- 'blank out the whole field, then re-print new value
- LOCATE Row%, InputCol%(FieldCtr%), 0
-
- FOR I% = 1 TO (FieldLength%(FieldCtr%))
- PRINT StringHolder$(FieldCtr%, I%);
- NEXT I%
-
- END IF
-
- 'if not at tail of list, advance ctrs
- IF Index% < FieldLength%(FieldCtr%) THEN
- Col% = Col% + 1
- Index% = Index% + 1
- 'user typed a valid character
- CharCtr% = CharCtr% + 1
- ELSE
- 'just typed the last allowable char for this field,
- 'give a mild peep sound
- SOUND 4200, 1
- END IF
-
- ELSE
- 'max num chars this field, give mild peep sound
- SOUND 4200, 1
- END IF
-
- ELSE
- 'not a valid character-give error beep
- CALL ErrorSound
- END IF
-
- ELSE
- 'user hit F1 key, assign the values in string array
- 'to the input-string fields, one field at a time
- FOR I% = 1 TO NumFields%
- 'null-out each row before assigning
- InputString$(I%) = ""
- 'unload each row of the matrix into it's corresponding
- 'array location in InputString()
- FOR J% = 1 TO FieldLength%(I%)
- InputString$(I%) = InputString$(I%) + StringHolder$(I%, J%)
- NEXT J%
- InputString$(I%) = RTRIM$(LTRIM$(InputString$(I%)))
- NEXT I%
-
- END IF
-
- END SELECT
-
- LOOP UNTIL Ky$ = F1$
-
- COLOR FrgdNorm%, BkgdNorm%, 0
- 'clear the msg line area
- FOR I% = 1 TO 3
- LOCATE 19 + I%, 2
- PRINT STRING$(77, " ")
- NEXT I%
-
- LOCATE InfoRow%, 3
- COLOR FrgdHi%, BkgdHi%, 0
- PRINT " Exit Editor And Save Current Values...Are You Sure? (Y/N): "
- LOCATE InfoRow%, 62
- INPUT "", Ans$
- Ans$ = UCASE$(Ans$)
-
- COLOR FrgdNorm%, BkgdNorm%, 0
- LOCATE InfoRow%, 2
- PRINT STRING$(77, " ")
-
- LOOP UNTIL Ans$ = "Y"
-
- 'jump around the highlite routines
- GOTO Bottom
-
- ' these routines are written as internal subs instead of external for
- ' convenience only-change to ext subs and pass the parameters if you wish
-
- '----------------Normal & Highlight Routines-----------------
- NORMAL:
-
- 'return highlighted field to normal
- COLOR FieldFrgdNorm%, FieldBkgdNorm%, 0
-
- LOCATE NormRow%, NormCol%, 0
- PRINT STRING$(FieldLength%(FieldCtr%), " ")
- LOCATE NormRow%, NormCol%, 0
-
- FOR I% = 1 TO FieldLength%(FieldCtr%)
- PRINT StringHolder$(FieldCtr%, I%);
- LOCATE NormRow%, NormCol% + I%, 0
- NEXT I%
-
- RETURN
-
- HIGHLIGHT:
-
- 'highlight the new field
- COLOR FieldFrgdHi%, FieldBkgdHi%, 0
-
- LOCATE HiLiteRow%, HiLiteCol%, 0
- PRINT STRING$(FieldLength%(FieldCtr%), " ")
- LOCATE HiLiteRow%, HiLiteCol%, 0
-
- FOR I% = 1 TO FieldLength%(FieldCtr%)
- PRINT StringHolder$(FieldCtr%, I%);
- LOCATE HiLiteRow%, HiLiteCol% + I%, 0
- NEXT I%
-
- RETURN
-
- Bottom:
-
- COLOR FrgdNorm%, BkgdNorm%, 0
-
- END SUB
-
- SUB ErrorSound STATIC
- '
- '-----------------------------------------------------------------------------
- '
- ' Input : No values passed into routine
- ' Process : Sends an error sound to the speaker
- ' Output : No values passed out of routine
- ' Coupling : Called by EditField
- ' Calls no routines
- '
- '-----------------------------------------------------------------------------
-
- FOR Frequency% = 900 TO 900 STEP 900
-
- SOUND Frequency%, 1
- SOUND Frequency% * (.785), 1
-
- NEXT Frequency%
-
- END SUB
-
- SUB Pause
- '
- '-----------------------------------------------------------------------------
- '
- ' Input : No values passed into routine
- ' Process : Displays a continue message and pauses program execution until
- ' user hits a key
- ' Output : No values passed out of routine
- ' Coupling : Called by EditField
- ' Calls no routines
- '
- '-----------------------------------------------------------------------------
-
-
- LOCATE 21, 3, 0
- PRINT "Type Any Key To Continue..."
-
- DO
- t$ = INKEY$
- LOOP UNTIL t$ <> ""
-
-
- END SUB
-